package Day09_Ex1_inheritence_poly;

import java.util.AbstractCollection;
import java.util.ArrayList;
import java.util.Iterator;

public class BikeStore<T> extends AbstractCollection<T> implements Iterable<T>{


	ArrayList<T> myBikeArray = new ArrayList<T>();
	
	@Override
	public boolean add(T e)
	{
		return myBikeArray.add(e);
	}
	
	public T get(int i) { //SUTBLE CHANGE TO JUST GET TO ALINE WITH LATER EXAMPLE!
		return myBikeArray.get(i);
	}
	
	@Override
	public Iterator<T> iterator() {
		//return myBikeArray.iterator();
		return new MyArrayListIterator<T>(myBikeArray);

	}

	@Override
	public int size() {
		return myBikeArray.size();
	}
}
